"""
打印当前环境变量
"""

import os

# 加载.env文件中的环境变量
from dotenv import load_dotenv
load_dotenv(dotenv_path="../.env")


# 测试读取环境变量
def test_env_variables():
    print("=== 测试环境变量读取 ===")

    # 测试核心环境变量
    PYTHONPATH = os.getenv("PYTHONPATH", "未设置")
    DATABASE_URL = os.getenv("DATABASE_URL", "未设置")
    CHROMA_PERSIST_DIR = os.getenv("CHROMA_PERSIST_DIR", "未设置")
    API_TYPE = os.getenv("API_TYPE", "未设置")
    LOCAL_MODEL_CACHE_PATH = os.getenv("LOCAL_MODEL_CACHE_PATH", "未设置")
    LOCAL_EM_NAME = os.getenv("LOCAL_EM_NAME", "未设置")
    LOCAL_EM_PATH = os.getenv("LOCAL_EM_PATH", "未设置")
    LOCAL_LLM_NAME = os.getenv("LOCAL_LLM_NAME", "未设置")
    LOCAL_LLM_PATH = os.getenv("LOCAL_LLM_PATH", "未设置")
    OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "未设置")
    OPENAI_EM = os.getenv("OPENAI_EM", "未设置")
    OPENAI_LLM = os.getenv("OPENAI_LLM", "未设置")
    ARK_API_KEY = os.getenv("ARK_API_KEY", "未设置")
    ARK_EM = os.getenv("ARK_EM", "未设置")
    ARK_LLM = os.getenv("ARK_LLM", "未设置")
    USERNAME = os.getenv("USERNAME", "未设置")
    PASSWORD = os.getenv("PASSWORD", "未设置")
    MIRROR_SITE_ENDPOINT = os.getenv("MIRROR_SITE_ENDPOINT", "未设置")

    # 打印结果
    print(f"PYTHONPATH: {PYTHONPATH}")
    print(f"DATABASE_URL: {DATABASE_URL}")
    print(f"CHROMA_PERSIST_DIR: {CHROMA_PERSIST_DIR}")
    print(f"API_TYPE: {API_TYPE}")
    print(f"LOCAL_MODEL_CACHE_PATH: {LOCAL_MODEL_CACHE_PATH}")
    print(f"LOCAL_EM_NAME: {LOCAL_EM_NAME}")
    print(f"LOCAL_EM_PATH: {LOCAL_EM_PATH}")
    print(f"LOCAL_LLM_NAME: {LOCAL_LLM_NAME}")
    print(f"LOCAL_LLM_PATH: {LOCAL_LLM_PATH}")
    print(f"OPENAI_API_KEY: {OPENAI_API_KEY}")
    print(f"OPENAI_EM: {OPENAI_EM}")
    print(f"OPENAI_LLM: {OPENAI_LLM}")
    print(f"ARK_API_KEY: {ARK_API_KEY}")
    print(f"ARK_EM: {ARK_EM}")
    print(f"ARK_LLM: {ARK_LLM}")
    print(f"USERNAME: {USERNAME}")
    print(f"PASSWORD: {PASSWORD}")
    print(f"MIRROR_SITE_ENDPOINT: {MIRROR_SITE_ENDPOINT}")


if __name__ == "__main__":
    test_env_variables()
